import { number } from "echarts"


export function decreaseAllRoutes (getRoutes:Array<any>){
    return getRoutes.map(item=>{
        return{
            ...item,
        }
    }).filter((item:any) =>item.meta&&item.meta.showLink)
}
// 根据规则解析数组
export function analysRules(storeArray:Array<any>,rulesIds:Array<any>){
   const resultArray:Array<any> = [] 
   const storageMap = new Map()
   storeArray.forEach((item)=>{
        storageMap.set(item.id,item.ruleName)
   })

   rulesIds.forEach((num)=>{
    //    这里需要转化下，
       const temp = Number(num)
       resultArray.push(storageMap.get(temp))
   })

  return resultArray
}